package com.example.pdm_project_group_001;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

public class DBDataControl {

	private static DBHelper dbh;
	private static SQLiteDatabase db;

	public DBDataControl(Context context){
		//loadDB(context);
	}
	
	public static void loadDB(Context context){
		dbh = new DBHelper(context);
		db = dbh.getWritableDatabase();
	}
	public static SQLiteDatabase getDB(){
		return db;
	}
	public static void writeInfo(String locA) {
//		ContentValues values = new ContentValues();
//		values.put(DBHelper.col1_locAName, "Kaduwela");
//		values.put(DBHelper.col2_locBName, "SLIIT-Malabe");
//		values.put(DBHelper.col1_locAPos, "000001");
//		values.put(DBHelper.col2_locBPos, "0000002");
//		values.put(DBHelper.col3_busNo, "177");
//
//		db.insert(DBHelper.TABLE_RouteData, null, values);
//		
//		Cursor cursor = db.query(DBHelper.TABLE_RouteData,
//				DBHelper.all_columns, null, null, null, null, null);
	}
	
	public static void updateDB(){
		
	}
}
